实际T—SQL问题如何解决!!!!!!!!

wisdomone 2006-08-24 04:31:14
-------建立family数据库--------

create database family
------建立表person-------
create table person(
personid int not null primary key,
[name] char(6) not null,
gender char(2) not null,
fatherid int null,
motherid int null,
dateofbirth datetime not null,
addofbirth char(100) not null,
addofcurr char(100) null,
dateofdeath datetime null)
--------------------在表person建立自反关系-------------
use family
go
alter table person add constraint fk_person_father
foreign key(fatherid) references dbo.person(personid)
alter table person add constraint fk_person_mother






------------------------------插入示例数据向表person----------------------------------
use family
INSERT dbo.Person (PersonID, [name], Gender, FatherID, MotherID, DateOfBirth, addofbirth,addofcurr,DateOfDeath)
VALUES(1, '翟明龙', '男', NULL, NULL, '1/1/1901','军宅村','军宅村','8/17/1970')
go
insert dbo.person(PersonID, [name], Gender, FatherID, MotherID, DateOfBirth, addofbirth,addofcurr,DateOfDeath)
values(2 ,'翟振南','男',1,null,'2/03/1932','军宅村','军宅村','12/09/2004')
go

insert dbo.person
values(3,'韩碧霞','女',null,null,'9/04/1933',' 王仁村','军宅村','8/28/2005')
go
insert dbo.person
values(4,'翟大理','男',2,3,'7/09/1956','军宅村','军宅村',null)
go
insert dbo.person
values(5,'王玉英','女',null,null,'9/18/1956','卤川村','军宅村',null)
go
insert dbo.person
values(6,'翟勋扬','男',4,5,'8/28/1981','军宅村','师大附中',null)
go
insert dbo.person
values(7,'翟勋章','男',4,5,'6/28/1984','军宅村','山东村',null)
go
insert dbo.person
values(8,'翟小理','男',2,3,'8/28/1958','军宅村','军宅村',null)
go
insert dbo.person
values(9,'刘咪','女',null,null,'9/04/1960',' 兴户村','军宅村',null)
go
insert dbo.person
values(10,'翟勋涛','男',8,9,'7/09/1982','军宅村','广东村',null)
go
insert dbo.person
values(11,'邢莉娟','女',null,null,'9/18/1983','邢村','广东村',null)
go
insert dbo.person
values(12,'翟涛勇','男',10,11,'8/28/2005','军宅村','军宅村',null)
go
insert dbo.person
values(13,'翟勋钊','男',8,9,'6/28/1983','军宅村','上海市',null)
go
insert dbo.person
values(14,'吴暄兰','女',null,null,'8/28/1984','东川村','上海市',null)
go



insert dbo.person
values(15,'翟钊芬','女',13,14,'9/04/2006',' 军宅村','军宅村',null)
go
insert dbo.person
values(16,'翟大赢','男',2,3,'9/11/1965','军宅村','军宅村',null)
go
insert dbo.person
values(17,'王玲','女',null,null,'9/18/1968','镇上村','军宅村',null)
go
insert dbo.person
values(18,'翟勋波','男',16,17,'8/28/1990','军宅村','‘军宅村',null)
go
insert dbo.person
values(19,'翟勋彤','女',16,17,'8/28/1993','军宅村','‘军宅村',null)

------------建立表 marriage-----------------------
use family
go

create table marriage(
marriageid int not null primary key,
husbandid int not null,
wifeid int not null,
dateofwedding datetime not null,
dateofdivoice datetime null)





-------------插入表MARRIAGE示例数据----------
insert marriage
values(1,2,3,'6/07/1953',null)


go
insert marriage
values(2,4,5,'6/07/1980',null)
go
insert marriage
values(3,8,9,'6/07/1981',null)

go
insert marriage
values(4,16,17,'6/07/1989',null)
go
insert marriage
values(5,10,11,'6/07/2004',null)
go
insert marriage
values(6,13,14,'1/07/2005',null)



总题如下:
1,查出作父母成员共有多少个孩子。
2,查找每个成员在同代中共有多个同性成员(不含自己)
3,输出拥有共同的父母且成员间为同性的成员.
4,输出每个成员父代除你父母以外的成员个数
5,输出每个成员在本代中排名每几位。
6,输出作父母的成员其子女年龄和在同代有子女的同代中排第几名。
7,输出作父母的成员在家族中其子女年龄总在有子女排第几名
希望大家一起来计论。
谢谢大家
...全文
165 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wisdomone 2006-08-25
  • 打赏
  • 举报
回复
麻烦大家分析一下啊
wisdomone 2006-08-24
  • 打赏
  • 举报
回复
这些都是解决不了的啊
iamltd 2006-08-24
  • 打赏
  • 举报
回复
楼主的作业吧?

双父树的问题,麻烦点而已,自己认真做。哈哈
Jane_64 2006-08-24
  • 打赏
  • 举报
回复
这么多问题你一个也解决不了??
先试试自己解决吧
有些很简单的
内容概要:本文详细记录了对一个Android ARM64静态ELF文件中字符串加密机制的逆向分析过程。该ELF文件的所有字符串均被加密,无法通过常规strings命令或IDA直接识别。作者通过分析发现,加密字符串存储在.rodata段,其解密所需信息(包括密文地址、长度和16位密钥)保存在.data.rel.ro段的40字节描述符中。核心解密函数sub_10F408采用自反的双pass流密码算法,结合固定密钥KEY_TERM(由.data段24字节数据计算得出),实现字节级非线性、位置与长度相关的加密。文章还复现了完整的Python解密脚本,并揭示了该保护机制的本质为代码混淆而非强加密,最终成功批量解密全部956条字符串,暴露程序真实行为,如shell命令模板、设备标识篡改、网络重置等操作。此外,文中还提及未启用的自定义壳框架及其反dump设计。; 适合人群:具备逆向工程基础的安全研究人员、二进制分析人员及对ELF保护技术感兴趣的开发者。; 使用场景及目标:①学习ELF二进制中字符串加密的典型实现方式与逆向突破口;②掌握从结构识别、函数追踪到算法还原的完整逆向流程;③理解“绑定二进制”的完整性校验设计及其局限性;④实践编写IDAPython脚本自动化提取与解密敏感数据。; 阅读建议:此资源以实战案例驱动,不仅展示技术细节,更强调逆向思维与验证方法,建议读者结合IDA调试环境,逐步跟随文中步骤进行动态分析与算法验证,深入理解每一步的推理依据。

27,580

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 应用实例
社区管理员
  • 应用实例社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧